import 'package:flutter/material.dart';
import 'package:flutter_saixiaoli/routes.dart';

class Face extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('人脸识别'),
        elevation: 0,
      ),
      body: Column(
        children: [
          Container(
            margin: EdgeInsets.only(top: 15),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.end,
              children: [
                Container(
                  //  margin: EdgeInsets.only(top: 30),
                  alignment: Alignment.center,
                  width: 15,
                  height: 15,
                  decoration: BoxDecoration(
                      border: Border.all(color: Color.fromRGBO(191, 55, 54, 1)),
                      borderRadius: BorderRadius.circular(15)),
                  child: Text(
                    '+',
                    style: TextStyle(
                        color: Color.fromRGBO(191, 55, 54, 1), height: 1.0),
                  ),
                ),
                Container(
                  height: 15,
                  margin: EdgeInsets.only(right: 12, left: 5),
                  child: Text('添加常用照片',
                      style: TextStyle(
                          color: Color.fromRGBO(191, 55, 54, 1),
                          fontSize: 12,
                          height: 1.2)),
                )
              ],
            ),
          ),
          Container(
            margin: EdgeInsets.only(top: 26),
            width: 200,
            child: Wrap(
              children: [
                Text(
                  '上传您的单人正面照片 帮你找到活动中摄影师镜头下的你',
                  style: TextStyle(fontSize: 15),
                  textAlign: TextAlign.center,
                )
              ],
            ),
          ),
          Container(
            margin: EdgeInsets.only(top: 45),
            child: Image.asset(
              'images/home/face.png',
              width: 205,
              height: 205,
              fit: BoxFit.cover,
            ),
          ),
          Container(
            margin: EdgeInsets.only(top: 50),
            child: SizedBox(
              width: 230,
              height: 44,
              child: ElevatedButton(
                style: ElevatedButton.styleFrom(
                    primary: Color.fromRGBO(221, 221, 221, 1)),
                onPressed: () {
                  Navigator.pushNamed(context, Routes.faceRes);
                },
                child: Text(
                  '确定查找',
                  style: TextStyle(color: Colors.white),
                ),
              ),
            ),
          ),
          Container(
              margin: EdgeInsets.only(top: 20),
              width: 220,
              child: RichText(
                text: TextSpan(children: [
                  WidgetSpan(
                      child: Text(
                    '* ',
                    style: TextStyle(color: Colors.red, fontSize: 12),
                  )),
                  TextSpan(
                      text: '温馨提示：上传正面大头照片最佳，非正面角 度和人物会影响匹配精准度',
                      style: TextStyle(
                          color: Color.fromRGBO(153, 153, 153, 1),
                          fontSize: 12))
                ]),
              ))
        ],
      ),
    );
  }
}
